<template>
	<div class="swiper-container banner">
				<div class="swiper-wrapper">
					<div class="swiper-slide" v-for="item in lunbo">
						<a href="#">
							<img :src="item.imageUrl" width="100%" />
						</a>
					</div>
				</div>
			</div>
</template>

<script>
	import $ from 'jquery'
	import Swiper from 'swiper';
	export default {
		data:function(){
			return {
				lunbo:[]
			}
		},
		mounted:function(){
			var url = 'http://localhost:3000/olider?time='+ new Date().getTime();
			var chat = this;
			$.get(url, function(res) {
                chat.lunbo = res.data.billboards;
                chat.$nextTick(function() {
                    new Swiper('.banner', {
                        loop: true,
                        autoplay: 1500,
                        autoplayDisableOnInteraction: false
                    })
                })
            })
		}
	}
</script>

<style>
</style>